HVM livemigation fails without this patch.
according to x86 side:
http://xenbits.xensource.com/xen-unstable.hg?rev/
55d0a5c70986
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
goto out;
}
- p2m_size = xc_memory_op(xc_handle, XENMEM_maximum_gpfn, &dom);
+ p2m_size = xc_memory_op(xc_handle, XENMEM_maximum_gpfn, &dom) + 1;
/* This is expected by xm restore. */
if (write_exact(io_fd, &p2m_size, sizeof(unsigned long))) {
atomic64_set(&d->arch.shadow_dirty_count, 0);
d->arch.shadow_bitmap_size =
- ((d->arch.convmem_end >> PAGE_SHIFT) +
- BITS_PER_LONG - 1) & ~(BITS_PER_LONG - 1);
+ (domain_get_maximum_gpfn(d) + BITS_PER_LONG) &
+ ~(BITS_PER_LONG - 1);
d->arch.shadow_bitmap = xmalloc_array(unsigned long,
d->arch.shadow_bitmap_size / BITS_PER_LONG);
if (d->arch.shadow_bitmap == NULL) {
unsigned long
domain_get_maximum_gpfn(struct domain *d)
{
- return (d->arch.convmem_end + PAGE_SIZE - 1) >> PAGE_SHIFT;
+ return (d->arch.convmem_end - 1) >> PAGE_SHIFT;
}
// stolen from share_xen_page_with_guest() in xen/arch/x86/mm.c